'''
Created on 12/11/2011

@author: Marina
'''

from fifo import Fifo
from kernel import Kernel
from rr import RR
from priority import Priority
#from multiprocessing import Queue



class FactoryKernel:
    '''
        self.ready = None
        self.memory = memory.Memory()
        self.pcbt = {}
        self.cpu = None
        self.pid_counter = 0
        self.current_pcb = None
        self.lock = threading.RLock()
        self.running = False
        self.kernel_mode = None
        self.timer = None 
        self.interrupt = None 
        self.pcb = None
        self.scheduler = None    
        self.pid = None
'''
    

    def __init__(self):
        '''
        Constructor
        '''
    def KernelWithFifo(self, manager):
        lista = []
        scheduler = Fifo(lista)
        kernel = Kernel(scheduler, manager)
        return kernel
    
    def KernelWithRR(self, unNumero, manager):
        lista = []
        scheduler = RR(lista)
        kernel = Kernel(scheduler, manager)
        kernel.initializeTimer(unNumero)
        return kernel
    
    def KernelWithPriority(self, manager):
        lista = []
        scheduler = Priority(lista)
        kernel = Kernel(scheduler, manager)
        kernel.inicializeAging()
        return kernel
        
        
        
    
        
        
            